<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${path}/css/editTable.css">
    
    <script type="text/javascript">
    	function check(){
    		var sp_code = document.getElementById("sp_code").value;
     		if("" == sp_code){
     			alert("请输入业务短号码");
     			return false;
     		}
     		
     		var day_limit = document.getElementById("day_limit").value;
     		if("" == day_limit){
     			alert("请输入日限制");
     			return false;
     		}
     		
     		var month_limit = document.getElementById("month_limit").value;
     		if("" == month_limit){
     			alert("请输入月限制");
     			return false;
     		}
     		
     		var one_shot_limit = document.getElementById("one_shot_limit").value;
     		if("" == one_shot_limit){
     			alert("请输入单次时限");
     			return false;
     		}
     		
     		var fee_type = document.getElementById("fee_type").value;
     		if("" == fee_type || "0" == fee_type){
     			alert("请选择计费类型");
     			return false;
     		}
     		
     		var fee_code = document.getElementById("fee_code").value;
     		if("" == fee_code){
     			alert("请输入计费金额");
     			return false;
     		}
    	}
    </script>
  </head>
  <body>
    <div>
    	<form id="editConfigBusinessForm" name="editConfigBusinessForm" method="post" action="${path }/configBusiness/updateConfigBusiness.action" onsubmit="return check();">
    		<p>填写业务短号码信息</p>
    		<c:choose>
    			<c:when test="${configBusinessVo.id == null}">
    				<input type="hidden" name="configBusinessVo.id" value="0" />
    			</c:when>
    			<c:otherwise>
    				<input type="hidden" name="configBusinessVo.id" value="${configBusinessVo.id }" />
    			</c:otherwise>
    		</c:choose>
    		<table>
    			<tr>
    				<td>业务短号码</td>
    				<td>
    					<input type="text" id="sp_code" name="configBusinessVo.sp_code" value="${configBusinessVo.sp_code }" size="9" maxlength="9" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项 &nbsp;&nbsp;&nbsp;&nbsp;格式：12590XXXX</span>
    				</td>
    			</tr>
    			<tr>
    				<td>日限(分)</td>
    				<td>
    					<input type="text" id="day_limit" name="configBusinessVo.day_limit" value="${configBusinessVo.day_limit }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>月限(分)</td>
    				<td>
    					<input type="text" id="month_limit" name="configBusinessVo.month_limit" value="${configBusinessVo.month_limit }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>单次时限(分)</td>
    				<td>
    					<input type="text" id="one_shot_limit" name="configBusinessVo.one_shot_limit" value="${configBusinessVo.one_shot_limit }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>屏蔽省份</td>
    				<td>
    					<input type="text" id="forbidden_province" name="configBusinessVo.forbidden_province" value="${configBusinessVo.forbidden_province }" />
    					<span style="color: red;size: 2px;">&nbsp;多个省份用英文逗号分割 &nbsp;&nbsp;&nbsp;&nbsp;格式:北京,上海</span>
    				</td>
    			</tr>
    			<tr>
    				<td>屏蔽城市</td>
    				<td>
    					<input type="text" id="forbidden_city" name="configBusinessVo.forbidden_city" value="${configBusinessVo.forbidden_city }" />
    					<span style="color: red;size: 2px;">&nbsp;多个城市用英文逗号分割 &nbsp;&nbsp;&nbsp;&nbsp;格式:南京,徐州</span>
    				</td>
    			</tr>
    			<tr>
    				<td>计费类型</td>
    				<td>
    					<select id="fee_type" name="configBusinessVo.fee_type">
    						<option value="0">--请选择--</option>
    						<option value="1" <c:if test="${configBusinessVo.fee_type eq 1 }">selected="selected"</c:if>>按时计费</option>
    						<option value="2" <c:if test="${configBusinessVo.fee_type eq 2 }">selected="selected"</c:if>>按条计费</option>
    					</select>
    					<span style="color: red;size: 2px;">&nbsp;*必选项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>计费金额(分)</td>
    				<td>
    					<input type="text" id="fee_code" name="configBusinessVo.fee_code" value="${configBusinessVo.fee_code }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>屏蔽开始时间</td>
    				<td>
    					<input type="text" id="start_time" name="configBusinessVo.start_time" value="${configBusinessVo.start_time }" />
    					<span style="color: red;size: 2px;">&nbsp;格式:XX:XX</span>
    				</td>
    			</tr>
    			<tr>
    				<td>屏蔽结束时间</td>
    				<td>
    					<input type="text" id="end_time" name="configBusinessVo.end_time" value="${configBusinessVo.end_time }" />
    					<span style="color: red;size: 2px;">&nbsp;格式:XX:XX</span>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
    					<input type="submit" name="submit" value="确认" />
    				</td>
    			</tr>
    		</table>
    	</form>
    </div>
  </body>
</html>